package org.openspml.providers.one_c.clients;

import java.net.MalformedURLException;

import org.openspml.client.LighthouseClient;
import org.openspml.providers.one_c.SpmlClientFactory;

/**
 * @author <A href="mailto:abashev at gmail dot com">Alexey Abashev</A>
 * @version $Id$
 */
public class RemoteNotauthorizedClient implements SpmlClientFactory {
	private static final String SPML_URL = "http://localhost:8080/servlet/rpcrouter2";

	public LighthouseClient getClient() {
		LighthouseClient client = new LighthouseClient();

		try {
			client.setUrl(SPML_URL);
		} catch (MalformedURLException e) {
			throw new RuntimeException("Wrong url - [" + SPML_URL + "]");
		}
		
		client.setTrace(true);
		
		return client;
	}
}
